﻿using AutoMapper;
using BCVP.Net8.Model.ViewModel;
using BCVP.Net8.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCVP.Net8.Common.Extensions
{
    public class CustomProfile : Profile
    {
        public CustomProfile() {
            CreateMap<User, UserVM>().ForMember(a => a.UserName, o => o.MapFrom(d => d.Name));
            CreateMap<UserVM, User>().ForMember(a => a.Name, o => o.MapFrom(d => d.UserName));
        }
    }
}
